<?php
/**
 * Created by PhpStorm.
 * User: 戎大富
 * Date: 2020/9/1
 * Time: 17:38
 */
namespace app\shop\controller;
use think\Db;
use think\Request;
class Affairs extends Base
{
    //商务合作
    public function index(){
        $agreement = Db::table('up_other')->where('other_id', 7)->value('other_hhr');
        $this->assign('agreement',$agreement);
        return $this->fetch();
    }
    //成为小易滴达合伙人
    public function swhz(){
        if(Request::instance()->isAjax()){
            $name = input('param.name');//姓名
            $phone = input('param.phone');//手机号码
            $city = input('param.city');//意向城市
            $data['franchisee_name'] = $name;
            $data['franchisee_phone'] = $phone;
            $data['franchisee_city'] = $city;
            $data['franchisee_time'] = date('Y-m-d H:i:s',time());
            Db::table('up_franchisee')->insertGetId($data);
            return json(['status' => 200, 'msg' => '成功']);
        }
        return $this->fetch();
    }
}